//根节点
import React from 'react'
import { StackNavigator } from 'react-navigation';
//动画样式
import CardStackStyleInterpolator from 'react-navigation/src/views/CardStack/CardStackStyleInterpolator';

// import TestInfo from '../components/test/content/testInfo'
// import TestList from '../components/test/content/testList'
// import AnimatedTest from '../components/test/animated/test'
// import TestTime from '../components/test/time/testTime'
// import TestMap from '../components/test/map/testMap'
// import TestImg from '../components/test/img/testImg'
import cityList from '../util/cityList/city'

import Splash from './spalsh/spalsh'
import App from './app'
import Login from '../containers/Login';
// 公司详情
import Company from '../components/postion/company/company';
// 主页搜索
import Select from '../components/home/select/select';
// 系统
import Install from '../components/system/install/follow_com';
// 系统-简历首页
import Resume from '../components/system/resume/Resume';
// 职位-职位详情
import Postionin from '../components/postion/postionin/index';
// 职位
import Postion from '../components/postion/index';
// 简历-基本信息编辑
import Rtopedit from '../components/system/resume/topedit/rtopedit';
// 注册
import Register from '../containers/register/index';
// 我的-每个状态
import Mestate from '../components/me/every/mestate';
// 系统-我的消息
import Newsall from '../components/system/news/newsall';
// 系统-我的消息-消息详情
import Newsinall from '../components/system/news/newsin/newsinall';
// 系统-个人信息
import Information from '../components/system/information/information';
// 系统-简历-职业意向编辑
import Rposedit from '../components/system/resume/position_edit/rposedit';
// 系统-简历-工作经验编辑
import Rexpedit from '../components/system/resume/experience_edit/rexpedit';
// 系统-简历-教育经历编辑
import Reduedit from '../components/system/resume/education_edit/reduedit';
// 系统-简历-项目经验编辑
import Rproedit from '../components/system/resume/project_edit/rproedit';
// 系统-最近浏览
import Browseall from '../components/system/browse/browseall';
// 系统-我收藏的职位
import Collectall from '../components/system/collect_pos/collectall';
// 系统-我关注的企业
import Followcomall from '../components/system/follow_com/install';
// 系统-谁看过我
import Whosee_all from '../components/system/whosee/whosee_all';
// 系统-账号设置-修改邮箱
import Inschange_email from '../components/system/install/email/inschange_email';
import Revise_email from '../components/system/install/email/revise/revise_email';
// 系统-系统--手机号
import Phone from '../components/system/install/phone/phone';
// 系统-简历-自我评价
import Evaluation from '../components/system/resume/evaluation/evaluation';
// 系统-简历-附加信息
import Attach from '../components/system/resume/attach/attach';
// 系统-简历-我的技能
import Skill from '../components/system/resume/skill/skill';
// 系统-钱包
import Wallet_all from '../components/system/wallet/wallet_all';
// 系统-钱包-先知豆
import Wallet_xainzhidou from '../components/system/wallet/wallet_xianzhidou/wallet_xianzhidou';
// 系统-钱包-选择支付方式
import Wallet_pay from '../components/system/wallet/wallet_pay/wallet_pay';
// 行业组件
import Trade from '../util/trade/Trade';
// 系统-账号设置-修改密码
import Password from '../components/system/install/password/password';
// 公司地址-地图
import Map_all from '../components/postion/company/every/map_all';
// 登录-忘记密码
import Validate from '../containers/Login/forget/validate';
// 选择求职或招人
import Choose from '../containers/register/choose/index';
// 系统-账号设置-关于我们
import About_us from '../components/system/install/about/about_us';
// 所有地图
import Map_own from '../containers/map/index';
import Busin from '../containers/map/busin';
// 系统-账号设置-意见反馈
import Suggestion from '../components/system/install/suggestion/suggestion';



// //------------企业的-----------------
// 首页-简历
import Cresume_all from '../components/home_c/resume/cresume_all';
//职位-浏览人数
import Cbrowse from '../components/managepos_c/browse/cbrowse';
//发布职位
import Cpublishpro_all from '../components/publishpro_c/cpublishpro_all';
//编辑公司-公司规模
import Companysize_all from '../components/publishpro_c/company_size/companysize_all';
// 编辑公司-福利待遇
import Cbenefits_all from '../components/publishpro_c/benefits/cbenefits_all';
// 编辑公司-职位描述
import Cdescribe_all from '../components/publishpro_c/describe_pos/cdescribe_all';
// 职位-职位详情
import Cdetailpos_all from '../components/managepos_c/detailspos/cdetailpos_all';
//编辑公司基本信息
import Ccombasic_all from '../components/home_c/company_basic/ccombasic_all';
//投递记录
import Cdeliver from '../components/managepos_c/deliver/cdeliver';
// 简历首页
import Manageres_c from '../components/manageres_c/manageres_c';
// 职位首页
import Manage_pos2 from '../components/managepos_c/havepos/manage_pos2';
// 编辑公司-地图
import Map_all_c from '../components/home_c/company_basic/map_all_c';
//企业系统
import Csystem_all from '../components/system_c/csystem_all';
//公司认证
import Cattestation_all from '../components/system_c/attestation_pos/cattestation_all';
//公司修改密码
import Password_c from '../components/system_c/password/password_c';
//公司意见反馈
import Suggestion_c from '../components/system_c/suggestion_c/suggestion_c';
//公司搜索
import Select_c from '../components/home_c/select_c/select_c';
//公司消息
import Newsall_c from '../components/home_c/news_c/newsall_c';
// 消息详情
import Newsin_c from '../components/home_c/news_c/newsin_c/newsin_c';



export default Root = StackNavigator({
    // //示例页
    // TestInfo: { screen: TestInfo },
    // //listView 示例
    // TestList: { screen: TestList },
    //动画 示例
    // AnimatedTest: { screen: AnimatedTest },
    cityList: {
        screen: cityList,
        navigationOptions: {
            header: null
        }
    },
    // //时间选择 示例
    // TestTime: { screen: TestTime },
    // //地图 示例
    // TestImg: {
    //     screen: TestImg,
    //     navigationOptions: {
    //         header: null
    //     }
    // },
    // //地图 示例
    // TestMap: {
    //     screen: TestMap,
    //     navigationOptions: {
    //         header: null
    //     }
    // },
    //广告页
    Splash: {
        screen: Splash,
        navigationOptions: {
            header: null
        }
    },
    //首页
    App: {
        screen: App,
        navigationOptions: {
            header: null
        }
    },
    //登录页
    Login: {
        screen: Login,
        navigationOptions: {
            header: null
        }
    },
    //系统
    Install: {
        screen: Install,
        navigationOptions: {
            header: null
        }
    },
    // 简历
    Resume: {
        screen: Resume,
        navigationOptions: {
            header: null
        }
    },
    //公司
    Company: {
        screen: Company,
        navigationOptions: {
            header: null
        }
    },
    //搜索
    Select: {
        screen: Select,
        navigationOptions: {
            header: null
        }
    },
    //职位详情
    Postionin: {                        //子页的
        screen: Postionin,
        navigationOptions: {
            header: null
        }
    },
    // 职位
    Postion: {
        screen: Postion,
        navigationOptions: {
            header: null
        }
    },
    Rtopedit: {
        screen: Rtopedit,
        navigationOptions: {
            header: null
        }
    },
    // 注册
    Register: {
        screen: Register,
        navigationOptions: {
            header: null
        }
    },
    Mestate: {
        screen: Mestate,
        navigationOptions: {
            header: null
        }
    },
    // 系统消息
    Newsall: {
        screen: Newsall,
        navigationOptions: {
            header: null
        }
    },
    Wallet_all: {
        screen: Wallet_all,
        navigationOptions: {
            header: null
        }
    },
    Wallet_xainzhidou: {
        screen: Wallet_xainzhidou,
        navigationOptions: {
            header: null
        }
    },
    Wallet_pay: {
        screen: Wallet_pay,
        navigationOptions: {
            header: null
        }
    },
    // 系统消息详细
    Newsinall: {
        screen: Newsinall,
        navigationOptions: {
            header: null
        }
    },
    // 个人信息
    Information: {
        screen: Information,
        navigationOptions: {
            header: null
        }
    },
    Rposedit: {
        screen: Rposedit,
        navigationOptions: {
            header: null
        }
    },
    Rexpedit: {
        screen: Rexpedit,
        navigationOptions: {
            header: null
        }
    },
    Reduedit: {
        screen: Reduedit,
        navigationOptions: {
            header: null
        }
    },
    Rproedit: {
        screen: Rproedit,
        navigationOptions: {
            header: null
        }
    },
    // 浏览记录
    Browseall: {
        screen: Browseall,
        navigationOptions: {
            header: null
        }
    },
    Collectall: {
        screen: Collectall,
        navigationOptions: {
            header: null
        }
    },
    Followcomall: {
        screen: Followcomall,
        navigationOptions: {
            header: null
        }
    },
    // 谁看了我
    Whosee_all: {
        screen: Whosee_all,
        navigationOptions: {
            header: null
        }
    },
    // 修改邮箱
    Revise_email: {
        screen: Revise_email,
        navigationOptions: {
            header: null
        }
    },
    Evaluation: {
        screen: Evaluation,
        navigationOptions: {
            header: null
        }
    },
    Attach: {
        screen: Attach,
        navigationOptions: {
            header: null
        }
    },
    Phone: {
        screen: Phone,
        navigationOptions: {
            header: null
        }
    },
    Inschange_email: {
        screen: Inschange_email,
        navigationOptions: {
            header: null
        }
    },
    Skill: {
        screen: Skill,
        navigationOptions: {
            header: null
        }
    },
    Password: {
        screen: Password,
        navigationOptions: {
            header: null
        }
    },
    Trade: {
        screen: Trade,
        navigationOptions: {
            header: null
        }
    },
    Map_all: {
        screen: Map_all,
        navigationOptions: {
            header: null
        }
    },
    Validate: {
        screen: Validate,
        navigationOptions: {
            header: null
        }
    },
    Choose: {
        screen: Choose,
        navigationOptions: {
            header: null
        }
    },
    About_us: {
        screen: About_us,
        navigationOptions: {
            header: null
        }
    },
    Map_own: {
        screen: Map_own,
        navigationOptions: {
            header: null
        }
    },
    Busin: {
        screen: Busin,
        navigationOptions: {
            header: null
        }
    },

    Suggestion: {
        screen: Suggestion,
        navigationOptions: {
            header: null
        }
    },


    // //企业的开始
    Cbrowse: {
        screen: Cbrowse,
        navigationOptions: {
            header: null
        }
    },
    Cresume_all: {
        screen: Cresume_all,
        navigationOptions: {
            header: null
        }
    },
    Cpublishpro_all: {
        screen: Cpublishpro_all,
        navigationOptions: {
            header: null
        }
    },
    Companysize_all: {
        screen: Companysize_all,
        navigationOptions: {
            header: null
        }
    },
    Cbenefits_all: {
        screen: Cbenefits_all,
        navigationOptions: {
            header: null
        }
    },
    Cdescribe_all: {
        screen: Cdescribe_all,
        navigationOptions: {
            header: null
        }
    },
    Cdetailpos_all: {
        screen: Cdetailpos_all,
        navigationOptions: {
            header: null
        }
    },
    Ccombasic_all: {
        screen: Ccombasic_all,
        navigationOptions: {
            header: null
        }
    },
    Cdeliver: {
        screen: Cdeliver,
        navigationOptions: {
            header: null
        }
    },
    Manageres_c: {
        screen: Manageres_c,
        navigationOptions: {
            header: null
        }
    },
    Manage_pos2: {
        screen: Manage_pos2,
        navigationOptions: {
            header: null
        }
    },
    Csystem_all: {
        screen: Csystem_all,
        navigationOptions: {
            header: null
        }
    },
    Cattestation_all: {
        screen: Cattestation_all,
        navigationOptions: {
            header: null
        }
    },
    Password_c: {
        screen: Password_c,
        navigationOptions: {
            header: null
        }
    },
    Suggestion_c: {
        screen: Suggestion_c,
        navigationOptions: {
            header: null
        }
    },
    Select_c: {
        screen: Select_c,
        navigationOptions: {
            header: null
        }
    },
    Newsall_c: {
        screen: Newsall_c,
        navigationOptions: {
            header: null
        }
    },
    Newsin_c: {
        screen: Newsin_c,
        navigationOptions: {
            header: null
        }
    },

    //企业地图
    Map_all_c: {
        screen: Map_all_c,
        navigationOptions: {
            header: null
        }
    },


}, {
        initialRouteName: 'Splash', // 默认显示界面
        // mode:"none",
        // headerMode:"none",
        transitionConfig: () => {
            screenInterpolator: TransitionConfiguration
        },
    })

//动画样式
const TransitionConfiguration = () => {
    return {
        transitionSpec: {
            duration: 300,
            easing: Easing.linear(),
            timing: Animated.timing,
        },
        screenInterpolator: (sceneProps) => {
            const { scene, scenes } = sceneProps;
            const { route, index } = scene;
            const params = route.params || {};
            const transition = params.transition || 'forHorizontal';

            switch (transition) {
                case 'forVerticalTop':
                    return forVerticalTop(sceneProps);

                case 'forHorizontalLeft':
                    return forHorizontalLeft(sceneProps);
                case 'freeStyle':
                    return freeStyle(sceneProps);
                default:
                    return CardStackStyleInterpolator[transition](sceneProps);
            }
        },
    };
};